package net.tv90.mchrmixin.mixin;

import net.minecraft.network.NetHandlerPlayServer;
import net.minecraft.network.play.client.C02PacketUseEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(value = NetHandlerPlayServer.class, remap = false)
public abstract class MixinNetHandlerPlayServer {


    @Redirect(
        method = "func_147340_a",
        at = @At(
            value = "INVOKE",
            target = "Lnet/minecraft/network/NetHandlerPlayServer;func_147360_c(Ljava/lang/String;)V"
        )
    )
    private void cancelInvalidEntityKick(NetHandlerPlayServer self, String reason) {
    }

//    @Inject(method = "func_147360_c", at = @At("HEAD"))
//    private void onKickPlayerFromServer(String reason, CallbackInfo ci) {
//        System.out.println("[MixinTest] kickPlayerFromServer called, reason = " + reason);
//    }
}
